from flask import Flask, flash
from flask_bcrypt import Bcrypt
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///market.db'
app.config['SECRET_KEY']='f041ccd1f7c22f79a1762b52'
db = SQLAlchemy(app)
#创建database models
bcrypt = Bcrypt(app)#将密码变为hash密码
login_manager=LoginManager(app)
login_manager.login_view="login_page"#如果没有注册，则转向login_view所指向的函数
login_manager.login_message_category='info'
from market import route